package com.wx.mythread.thread;

public class SuperClassSynchroize {

    public synchronized void doSomething(){
        System.out.println("我是父类方法"+this);
    }
}

class TestClass extends SuperClassSynchroize{
    public synchronized void doSomething(){
        System.out.println("我是子类方法"+this);
        super.doSomething();
    }

    public static void main(String[] args) {
        TestClass testClass = new TestClass();
        testClass.doSomething();
    }
}
